package com.xioyi.news.dao.impl;

import java.util.List;

import javax.persistence.Query;

import com.xioyi.news.domain.Article;

public class ArticleDao extends IBaseDAOImpl<Article, Integer> {
	public List<Article> getArticlesByCatalog(Integer catalogId){
		String hql="from Article a where a.catalogId="+catalogId;
		Query query = getEm().createQuery(hql);
		query.getResultList();
		return query.getResultList();
	}
}
